//
//  OrdinaryTeacherAccountCell.m
//  优学荟管理系统
//
//  Created by 星道 on 2017/9/30.
//  Copyright © 2017年 星道三好. All rights reserved.
//

#import "OrdinaryTeacherAccountCell.h"

@implementation OrdinaryTeacherAccountCell
{
    
    IBOutlet UILabel *_Name;
    IBOutlet UILabel *_UserName;
    IBOutlet UIImageView *_Img;
}

- (void)setModel:(OrdinaryTeacherAccountModel *)Model {

    _Model = Model;

    _Name.text = _Model.petName;
    _UserName.text = _Model.username;
    if (![Model.avatar isKindOfClass:[NSNull class]]) {
        [_Img sd_setImageWithURL:[NSURL URLWithString:Model.avatar] placeholderImage:[UIImage imageNamed:@"icon_teacher_default"]];
    }
}

- (IBAction)ClickUpload:(UIButton *)sender {

    self.Upload ? self.Upload(self.Model):nil;
}
@end
